<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" import="custom.*, java.util.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%	// set session attribute for university
	Vector<LinkedHashMap<String, Object>> degrees = (Vector<LinkedHashMap<String, Object>>)session.getAttribute("degrees");
	LinkedHashMap<String, Object> degree = degrees.get(degrees.size()-1);

	// maybe a user-defined university or not
	String degreeUniId = request.getParameter("degreeUniID");
    if(degreeUniId != null) {
        degree.put("uniId", Integer.parseInt(degreeUniId));
    }
	degree.put("uniName", request.getParameter("degreeUniName"));
	session.setAttribute("degrees", degrees);

    Vector majors = support.getMajors();
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Provide degrees - Choose discipline</title>
</head>
<body>
<h3>Please choose your discipline: </h3> <p>
<form method="GET" action="degreeMore.jsp">
<%	Iterator it = majors.iterator();
	String majorName = "";
	while(it.hasNext() ) {
        Vector majorVec = (Vector)it.next();
%>
<input type="radio" name="major" value="<%= majorVec.get(0) %>" /> <%= majorVec.get(1) %> <br>
<% } %>
<p> If your major is not listed above, please specify: <input type="text" size="15" name="majorSpecify" /> <p>
Expected time of graduation: <br>
Month: <input type="text" size="5" name="month" /> Year: <input type="text" size="5" name="year" /> <p>
Expected GPA: <input type="text" size="5" name="gpa" /> <p>
Degree type: <select name="type"><option value="BS">BS</option><option value="MS">MS</option><option value="PhD">PhD</option></select> <p>
<input type="submit" value="Submit" />
</form>
</body>
</html>
